<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Welcome to CodeIgniter</title>
<link href="<?php echo base_url()?>/css/master.css" media="screen" rel="stylesheet" type="text/css">
</head>
<body>

	<div id="container">
		<h1>Welcome to CodeIgniter!</h1>

		<div id="body">
			<?php if ($this->ion_auth->is_group("members")):?>
				<a href="<?php echo site_url("users/main");?>">Users Menu</a><br>
			<?php endif;?>
			<?php if ($this->ion_auth->is_group("admin")):?>
				<a href="<?php echo site_url("admin/admin");?>">Admin Menu</a><br>
			<?php endif;?>
			<?php if ($this->ion_auth->logged_in()): ?>
			<a href="<?php echo site_url("logout");?>">Logout of this thing</a></br>
			<pre>
            <?php echo print_r($this->ion_auth->get_user(), TRUE) ?>
        </pre>
			<?php else: ?>
			<h2>Welcome to this facebook thing, please login below</h2>
			<a href="<?php echo $login_url ?>">Login to this thing by facebook</a><br>
			<a href="<?php echo site_url("login");?>">Login to this thing</a><br>
			<a href="<?php echo site_url("register");?>">Register</a><br>
			<?php endif; ?>
		</div>

		<p class="footer">
			Page rendered in <strong>{elapsed_time}</strong> seconds
		</p>

	</div>

</body>
</html>
